Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
@paprika/helpers
Advanced tools
JavaScript and React helper utilities.
yarn add @paprika/helpers
or with npm:
npm install @paprika/helpers
Import the helper function you want to use by name from the Paprika helpers
package:
import { helperFunction } from "@paprika/helpers";
Polyfills must be imported directly from their source in the lib
folder. For example:
import "@paprika/helpers/lib/polyfills/elementClosest";
Returns a function that will call all functions passed as arguments.
Get a hash table of components from chilren
argument where the displayName
property of child
matches an item provided in the types
argument with the keys of the return object matching the items in types
.
Get the props
object from the target
argument component type if it exists in children
argument.
Returns true if NODE_ENV
is undefined
or "development".
A variety of custom React prop types including:
ShirtSizes
AlignTypes
deprecated
InputValidTypes
FocusPropTypes
RefOf
Returns the element that is currently focussed, even when that element is found within an open web component.
Returns true
if the element that is currently focussed is the element
argument, or any descendent of element
.
Sets body overlow
to hidden
.
Wrapper for ReactDOM.createPortal
.
Provides a value
after a specified delay
.
Set parentRef
to ref
.
Provides a ref with a current
value of true
if component is (still) mounted.
Provides the previous value of the value
argument.
IE polyfill for Element.closest()
.
IE polyfill for Element.scroll()
, Element.scrollTo()
, Element.scrollBy()
.
FAQs
JavaScript and React helper utilities
The npm package @paprika/helpers receives a total of 5,923 weekly downloads. As such, @paprika/helpers popularity was classified as popular.
We found that @paprika/helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.